package org.wggds.webservices.io.data;

import org.wggds.webservices.io.WggdsQueryExcpetion;

public enum Persubstitution
{
    None("none"),
    PerMethylation("pme"),
    PerAcetylation("pac"),
    PerDeuteroMethylation("pdme"),
    PerDeuteroAcetylation("pdac"),
    C13Labeling("pc13me");

    private String m_name = null;

    private Persubstitution(String a_name)
    {
        this.m_name = a_name;
    }

    public static Persubstitution forName( String a_name) throws WggdsQueryExcpetion
    {
        for ( Persubstitution a : Persubstitution.values() )
        {
            if ( a_name.equalsIgnoreCase(a.m_name) )
            {
                return a;
            }
        }
        throw new WggdsQueryExcpetion("Unknown persubstitution name: " + a_name);
    }
    
    public String getName()
    {
        return this.m_name;
    }
}
